package com.fieldIndustry.service.impl;

import com.base.service.impl.ServiceImpl;
import com.fieldIndustry.pojo.Fieldindustry;
import com.fieldIndustry.service.IFieldindustryService;

public class FieldindustryServiceImpl <T extends Fieldindustry>extends ServiceImpl<T> implements 
		IFieldindustryService<T> {

	@Override
	public boolean create(T fieldindustry) {
		if (dao.createQuery(
		" from Fieldindustry d where d.fieldIndustry = '"+ fieldindustry.getFieldIndustry()+"'").list().size() > 0) {
			dao.save(fieldindustry);
			return false;
        }else{

		dao.create(fieldindustry);
		return true;
        }
		
	}

}
